package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbSubscribeRecordMapper;
import com.ruoyi.system.domain.TbSubscribeRecord;
import com.ruoyi.system.service.ITbSubscribeRecordService;

/**
 * 预约记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-31
 */
@Service
public class TbSubscribeRecordServiceImpl implements ITbSubscribeRecordService 
{
    @Autowired
    private TbSubscribeRecordMapper tbSubscribeRecordMapper;

    /**
     * 查询预约记录
     * 
     * @param id 预约记录主键
     * @return 预约记录
     */
    @Override
    public TbSubscribeRecord selectTbSubscribeRecordById(Long id)
    {
        return tbSubscribeRecordMapper.selectTbSubscribeRecordById(id);
    }

    /**
     * 查询预约记录列表
     * 
     * @param tbSubscribeRecord 预约记录
     * @return 预约记录
     */
    @Override
    public List<TbSubscribeRecord> selectTbSubscribeRecordList(TbSubscribeRecord tbSubscribeRecord)
    {
        return tbSubscribeRecordMapper.selectTbSubscribeRecordList(tbSubscribeRecord);
    }

    /**
     * 新增预约记录
     * 
     * @param tbSubscribeRecord 预约记录
     * @return 结果
     */
    @Override
    public int insertTbSubscribeRecord(TbSubscribeRecord tbSubscribeRecord)
    {
        tbSubscribeRecord.setCreateTime(DateUtils.getNowDate());
        return tbSubscribeRecordMapper.insertTbSubscribeRecord(tbSubscribeRecord);
    }

    /**
     * 修改预约记录
     * 
     * @param tbSubscribeRecord 预约记录
     * @return 结果
     */
    @Override
    public int updateTbSubscribeRecord(TbSubscribeRecord tbSubscribeRecord)
    {
        return tbSubscribeRecordMapper.updateTbSubscribeRecord(tbSubscribeRecord);
    }

    /**
     * 批量删除预约记录
     * 
     * @param ids 需要删除的预约记录主键
     * @return 结果
     */
    @Override
    public int deleteTbSubscribeRecordByIds(Long[] ids)
    {
        return tbSubscribeRecordMapper.deleteTbSubscribeRecordByIds(ids);
    }

    /**
     * 删除预约记录信息
     * 
     * @param id 预约记录主键
     * @return 结果
     */
    @Override
    public int deleteTbSubscribeRecordById(Long id)
    {
        return tbSubscribeRecordMapper.deleteTbSubscribeRecordById(id);
    }
}
